package com.example.demo.api.service;

import com.example.demo.api.mapper.CustomMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Service
@Slf4j
public class CustomService {

    @Resource
    private CustomMapper customMapper;

    public List<Map<String, Object>> query() {
        return customMapper.query();
    }

    public String add() {
        customMapper.add();
        return "OK";
    }

    public String create() {
        customMapper.create();
        return "Create";
    }

    public List<Map<String, Object>> queryById(String id) {
        return customMapper.queryById(id);
    }
}
